home *** CD-ROM | disk | FTP | other *** search
-
- ---------------------------------------------------------------------------
- 1) HOW TO USE ZOCEVENT.ZRX
- ---------------------------------------------------------------------------
-
- The ZOCEVENT.ZRX file is called at certain points in ZOC (with the
- parameters identifying the event shown in the table below).
-
- The ZOCEVENT file can, for example, be used to turn off a fax program
- before ZOC will try to access the com port and turn fax receive mode
- back on when ZOC exits (OS/2's FaxWorks offers such a feature via the
- FXRCV.EXE program, as shown in the sample ZOCEVENT.ZRX file).
-
-
-
- ---------------------------------------------------------------------------
- 2) CALL PARAMETERS
- ---------------------------------------------------------------------------
-
- ---------------------------- ------------------------------------------
- EVENT PARAMETER(S)
- ---------------------------- ------------------------------------------
- ZOC Start OPEN
- Before a device is opened DEVOPEN '<device name>' '<device opts>'
- After a device was closed DEVCLOSE '<device name>'
- ZOC Ends CLOSE
- ---------------------------- ------------------------------------------
-
- The DeviceName is the same as it appears in ZOC, but always in upper
- case letters (eg. SERIAL/MODEM).
-
- The DeviceOpts are undocumented, so you need a bit of experimenting
- with them (see the debugging section below). However, since they are
- probably only used to determine the com port, here is how to parse
- the SERIAL/MODEM options:
-
- /* ZOCEVENT.ZRX */
- PARSE ARG Event " '" DeviceName "'" "'" DeviceOpts "'"
-
- /* if serial, get com port */
- IF Event="DEVOPEN" & DeviceName="SERIAL/MODEM" THEN DO
- PARSE VALUE DeviceOpts WITH "[" id "]" serport ":" baud "-" opts "|"
- serport= TRANSLATE(serport) /* uppercase */
- CALL LINEOUT "zocevent.trc", "OPEN OF "serport" DETECTED"
- END /* IF */
-
-
-
- ---------------------------------------------------------------------------
- 3) SPECIAL PROGRAMMING ISSUES
- ---------------------------------------------------------------------------
-
- You can call all of the ZOC commands. However, not many will make
- sense in the environment in which ZOCEVENT.ZRX is called, because
- no communication device is open and (in case of OPEN and CLOSE) not
- even a ZOC window is there.
-
-
-
- ---------------------------------------------------------------------------
- 4) DEBUGGING
- ---------------------------------------------------------------------------
-
- If no ZOC window is there, SAY or TRACE will pop up a message window
- with the message you want to show. As this makes debugging a bit
- tedious, you can write debugging output to a file with REXX's
- lineout command:
-
- CALL LINEOUT "zocevent.trc", event "#" DeviceName "#" DeviceOpts
-
- Under OS/2 you can call the script from the command line with the
- same parameters that ZOC would use, eg.:
-
- C:\ZOC> SCRIPT\ZOCEVENT "DEVOPEN" "SERIAL/MODEM" "[1]COM3:38400-8N1|"
-
-